package
{   
    public class XMLUtil   
    {   
        public function XMLUtil()   
        {   
        }   
        public static function getNodeNames(xml:XML):Array {   
            if (xml.children()=="") return [];   
            var len:int = xml.children()[0].children().length();   
            if (len==0) return [];   
            var i:int;   
            var names:Array=[];   
            for (i=0; i<len;i++) {   
                names.push(XML(xml.children()[0].children()[i]).name().toString());   
            }   
            return names;   
        }   
    }   
} 